//
//  MBProgressHUD+SCHUDExtension.h
//  PhotoAlbum
//
//  Created by Chao Sheng on 2021/12/7.
//

#import "MBProgressHUD.h"
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <SDWebImage/UIImageView+WebCache.h>
#import "SCClipImageView.h"

NS_ASSUME_NONNULL_BEGIN

@interface UIImageView (SCNetImgExtension)

/// 加载网络图片
- (void)sc_setImageWithModel:(SCPhotoModel *)model progress:(void (^)(CGFloat progress, SCPhotoModel *model))progressBlock completed:(void (^)(UIImage * image, NSError * error, SCPhotoModel * model))completedBlock;

@end

@interface UIView (SCExtension)

- (UIViewController*)sc_currentViewController;

@end

@interface MBProgressHUD (SCHUDExtension)

+ (void)showSCHudText:(NSString*)str;

+ (void)showSCLoadind:(NSString *)text;

+ (void)hideSCHud;

@end

@interface NSDate (SCDateExtension)

/**
 是否今天

 @return yes or no
 */
- (BOOL)isToday;

/**
 是否昨天

 @return yes or no
 */
- (BOOL)isYesterday;

/**
 是否今年
 
 @return yes or no
 */
- (BOOL)isThisYear;

/**
 和今天是否在同一周
 
 @return yes or no
 */
- (BOOL)isSameWeek;

- (NSString *)getNowWeekday;

/**
 按指定格式获取当前的时间

 @param format 格式
 @return 日期字符串
 */
- (NSString *)dateStringWithFormat:(NSString *)format;

@end

@interface UIImage (SCOrientationExtension)

/// 改变图片方向
+ (UIImage *)changeOrientation:(SCImageOrientation)orientation image:(UIImage *)image;

/// 获取pod中的bundle图片
+ (UIImage*)sc_bundleImageNamed:(NSString*)name;

@end

NS_ASSUME_NONNULL_END
